/**  
  -- The Performance Driven Lime Project -- 

  A self adaptive tuple space for mobile agents and hosts by dynamic
  adapting tuple's replication policy.
  
  Copyright (C) 2008
  Xing Jiankuan, Pan Wenhui
  SAGroup of Tsinghua University

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Lesser General Public License for more details.

  You should have received this copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
 */
package sagroup.dracots.commands;

import sagroup.dracots.Field;
import sagroup.dracots.SignalTuple;
import sagroup.dracots.SystemTupleType;
import sagroup.dracots.TupleType;
import lime2.Location;

/**
 * ADD_REPLICA_REQUEST_COMMAND is a command to request replicas. The command
 * consists of an array of <code>ReplicaRequestEntry</code>. Each entry contains
 * a vid and an expected version. The handler of this command will register
 * replica update link specified by vids. For each entry, if its expected
 * version is less than that of local tuple, the handler should immediately send
 * that tuple to command's initiator.
 * 
 * @author Xing Jiankuan
 * 
 */
public class AddReplicaRequestByTypeCommand extends SignalTuple {
	private static final long serialVersionUID = -4662023585012558747L;

	@Field
	private TupleType targetType;

	public AddReplicaRequestByTypeCommand() {
		
	}
	
	public AddReplicaRequestByTypeCommand(TupleType targetType, Location dest) {
		super(SystemTupleType.COMMAND, dest);
		this.targetType = targetType;
	}
	
	public TupleType getTargetType() {
		return targetType;
	}
}
